#include<iostream>
#include<string>
#include<vector>
#include<queue>

using namespace std;

const int ax[4]={1,0,0,-1};
const int ay[4]={0,-1,1,0};
const char dir[4]={'D','L','R','U'};
int h, w;
vector<vector<int>> maze;

struct point {
	int x,y;
	string ans;
	point(int a,int b,string c):x(a),y(b),ans(c){}
};

bool judge(int x,int y) {
	if(x>=0&&x<h&&y>=0&&y<w&&!maze[x][y])
		return true;
	return false;
}

void bfs() {
	queue<point>ans;
	ans.push(point(0,0,""));
	maze[0][0]=1;
	while(!ans.empty()) {
		point temp=ans.front();
		ans.pop();
		if(temp.x==h-1&&temp.y==w-1) {
			cout<<temp.ans<<endl;
			return ;
		}
		for(int i=0;i<4;i++) {
			int tempx=temp.x+ax[i];
			int tempy=temp.y+ay[i];
			if(judge(tempx,tempy)) {
				maze[tempx][tempy]=1;
				ans.push(point(tempx,tempy,temp.ans+dir[i]));
			}
		}
	}
}

int main() {
	cin>>h>>w;
	maze = vector<vector<int>>(h, vector<int>(w));
	for(int i=0;i<h;i++)
		for(int j=0;j<w;j++) {
			char t;
			cin>>t;
			maze[i][j]=t-'0'; 
		}
	bfs();
	return 0;
}

